package org.example.diary.entity.dto;

import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.example.diary.validator.UpdateGroup;

@Data
public class DiaryAddDTO {

    /**
     * 修改时必填，新增时不填
     */
    @NotNull(message = "id不可为空", groups = UpdateGroup.class)
    private Integer id;

    private String title;

    private String content;

}
